package com.api.shopapi.service.impl;

import com.api.shopapi.entity.GoodsPrice;
import com.api.shopapi.entity.dto.GoodsPriceDTO;
import com.api.shopapi.mapper.GoodsPriceMapper;
import com.api.shopapi.service.GoodsPriceService;
//import com.sun.org.apache.regexp.internal.RE;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("GoodsPriceServiceImplOne")
public class GoodsPriceServiceImpl implements GoodsPriceService {

    @Autowired
    private GoodsPriceMapper goodsPriceMapper;


    @Override
    public int insert(GoodsPrice goodsPrice) {
        return goodsPriceMapper.insert(goodsPrice);
    }

    @Override
    public int update(GoodsPrice goodsPrice) {
        return goodsPriceMapper.update(goodsPrice);
    }

    @Override
    public GoodsPrice getByGoodsPriceCode(String goodsPriceCode) {
        return goodsPriceMapper.getByGoodsPriceCode(goodsPriceCode);
    }

    @Override
    public List<GoodsPriceDTO> getByGoodsCode(String goodsCode) {
        return goodsPriceMapper.getByGoodsCode(goodsCode);
    }

    @Override
    public int delete(String goodsPriceCode) {
        return goodsPriceMapper.delete(goodsPriceCode);
    }

    @Override
    public GoodsPrice getFloorPrice(String goodsCode) {
        return goodsPriceMapper.getFloorPrice(goodsCode);
    }

    @Override
    public GoodsPrice getPrice(String goodsCode) {
        return goodsPriceMapper.getPrice(goodsCode);
    }
}
